      SUBROUTINE SETUP
      RETURN
      END
C   HS111   10-2520
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS111'/
      DATA (X(I),I=1,10)/10*-2.3D0/
      DATA N/10/ , NH/3/ , NG/20/
      DATA DEL0/1.00D0/ ,TAU0/1.D4/ ,TAU/.1D0/
      DATA (GUNIT(1,J),J=4,23)/20*1/,(GUNIT(3,I),I=4,23)/10*1,10*-1/,
     F     (GUNIT(2,I),I=4,23)/1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,
     F     10/,((GUNIT(I,J),I=1,3),J=0,3)/-1,0,0,-1,0,0,-1,0,0,-1,0,0/
      END
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      INTEGER J
      DOUBLE PRECISION FX,X(NX),C(10),S,S1,E
      SAVE C
      DATA  C/-6.089D0,-17.164D0,-34.054D0,-5.914D0,-24.721D0,-14.986D0,
     1        -24.100D0,-10.708D0,-26.662D0,-22.179/
      ICF=ICF+1
      S=0.D0
      S1=0.D0
      DO      100      J=1,10
      E=DEXP(X(J))
      S=S+E*(X(J)+C(J))
      S1=S1+E
  100 CONTINUE
      FX=S-DLOG(S1)*S1
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      INTEGER J
      DOUBLE PRECISION X(NX),GRADF(NX),C(10),E(10),S
      SAVE C
      DATA  C/-6.089D0,-17.164D0,-34.054D0,-5.914D0,-24.721D0,-14.986D0,
     1        -24.100D0,-10.708D0,-26.662D0,-22.179/
      ICGF=ICGF+1
      S=0.D0
      DO      100      J=1,10
      E(J)=DEXP(X(J))
      S=S+E(J)
 100  CONTINUE
      S=DLOG(S)
       DO      200      J=1,10
      GRADF(J)=E(J)*(C(J)+X(J)-S)
  200 CONTINUE
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),A,HXI
      SAVE A
      DATA A/50.176D0/
      CRES(I)=CRES(I)+1
       GOTO (100,200,300),I
  100 CONTINUE
      HXI=DEXP(X(1))+2.D0*(DEXP(X(2))+DEXP(X(3)))+DEXP(X(6))
     1       +DEXP(X(10))-2.D0
      RETURN
  200 CONTINUE
      HXI=DEXP(X(4))+2.D0*DEXP(X(5))+DEXP(X(6))+DEXP(X(7))-1.D0
      RETURN
  300 CONTINUE
      HXI=DEXP(X(3))+DEXP(X(7))+DEXP(X(8))+2.D0*DEXP(X(9))+DEXP(X(10))
     1      -1.D0
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J
      DOUBLE PRECISION X(NX),GRADHI(NX),B(10,3),V
      SAVE B
      DATA B/1.D0,2*2.D0,2*0.D0,1.D0,3*0.D0,1.D0,3*0.D0,1.D0,2.D0,
     1       2*1.D0,5*0.D0,1.D0,3*0.D0,2*1.D0,2.D0,1.D0/
      CGRES(I)=CGRES(I)+1
      DO      100       J=1,10
      V=B(J,I)
      IF( V .EQ. 0D0)    GRADHI(J)=0.D0
      IF( V .NE. 0D0)    GRADHI(J)=V*DEXP(X(J))
  100 CONTINUE
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GXI
      IF ( GUNIT(1,I+NH) .EQ. -1 ) CRES(I+NH)=CRES(I+NH)+1
      IF(I .GT.10)     GXI=1.D2-X(I-10)
      IF(I .LE. 10)    GXI=X(I)+1.D2
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX) ,GRADGI(NX)
      RETURN
      END

